<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Whisper: sample_io.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Whisper
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">sample_io.h</div>  </div>
</div>
<div class="contents">
<a href="sample__io_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef __SAMPLE_IO_H__</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define __SAMPLE_IO_H__ 1</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &quot;<a class="code" href="audio__formats_8h.html">audio_formats.h</a>&quot;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#include &quot;<a class="code" href="properties__reader_8h.html">properties_reader.h</a>&quot;</span>
<a name="l00006"></a>00006 
<a name="l00007"></a>00007 <span class="comment">/*</span>
<a name="l00008"></a>00008 <span class="comment"> *                o---------------o</span>
<a name="l00009"></a>00009 <span class="comment"> *  read EMBED    |     main      | write EMBED</span>
<a name="l00010"></a>00010 <span class="comment"> * --------------&gt;|  embed data   |--------------&gt;</span>
<a name="l00011"></a>00011 <span class="comment"> *                |               |</span>
<a name="l00012"></a>00012 <span class="comment"> *                | - - - - - - - |</span>
<a name="l00013"></a>00013 <span class="comment"> *  write EXTRACT |     main      | read EXTRACT</span>
<a name="l00014"></a>00014 <span class="comment"> * &lt;--------------|  extract data |&lt;--------------</span>
<a name="l00015"></a>00015 <span class="comment"> *                |               |</span>
<a name="l00016"></a>00016 <span class="comment"> *                o---------------o</span>
<a name="l00017"></a>00017 <span class="comment"> *</span>
<a name="l00018"></a>00018 <span class="comment"> * The main programm calls the read method from the ISampleIO instance. The</span>
<a name="l00019"></a>00019 <span class="comment"> * read method set the pAction reference to EMBED or EXTRACT therefore the</span>
<a name="l00020"></a>00020 <span class="comment"> * main programm knows if it should embed or extract. If the main embed datas</span>
<a name="l00021"></a>00021 <span class="comment"> * then it call the write method with pAction is EMBED or otherwise with</span>
<a name="l00022"></a>00022 <span class="comment"> * pAction is EXTRACT.</span>
<a name="l00023"></a>00023 <span class="comment"> *</span>
<a name="l00024"></a>00024 <span class="comment"> */</span>
<a name="l00025"></a><a class="code" href="classISampleIO.html">00025</a> <span class="keyword">class </span><a class="code" href="classISampleIO.html">ISampleIO</a>
<a name="l00026"></a>00026 {
<a name="l00027"></a>00027 <span class="keyword">public</span>:
<a name="l00028"></a><a class="code" href="classISampleIO.html#a33f1d3778c9c332648df649a73fdb44c">00028</a>         <span class="keyword">enum</span> <a class="code" href="classISampleIO.html#a33f1d3778c9c332648df649a73fdb44c">EAction</a>
<a name="l00029"></a>00029         {
<a name="l00030"></a><a class="code" href="classISampleIO.html#a33f1d3778c9c332648df649a73fdb44ca34a8a5b01bf314c670c7427b72ba179f">00030</a>                 <a class="code" href="classISampleIO.html#a33f1d3778c9c332648df649a73fdb44ca34a8a5b01bf314c670c7427b72ba179f">UNKNOWN_ACTION</a> = 0,
<a name="l00031"></a><a class="code" href="classISampleIO.html#a33f1d3778c9c332648df649a73fdb44ca94dd3f80b8b47ea47735b117c096c897">00031</a>                 <a class="code" href="classISampleIO.html#a33f1d3778c9c332648df649a73fdb44ca94dd3f80b8b47ea47735b117c096c897">NO_ACTION</a>,
<a name="l00032"></a><a class="code" href="classISampleIO.html#a33f1d3778c9c332648df649a73fdb44ca3279ddc907bab3b5edc827db94b78b85">00032</a>                 <a class="code" href="classISampleIO.html#a33f1d3778c9c332648df649a73fdb44ca3279ddc907bab3b5edc827db94b78b85">EMBED</a>,
<a name="l00033"></a><a class="code" href="classISampleIO.html#a33f1d3778c9c332648df649a73fdb44ca6fbf5c59e67e467e1c91e5a91e0176af">00033</a>                 <a class="code" href="classISampleIO.html#a33f1d3778c9c332648df649a73fdb44ca6fbf5c59e67e467e1c91e5a91e0176af">EXTRACT</a>,
<a name="l00041"></a><a class="code" href="classISampleIO.html#a33f1d3778c9c332648df649a73fdb44ca4aa4f5ff775e5a8131f22e2833ae724c">00041</a>                 <a class="code" href="classISampleIO.html#a33f1d3778c9c332648df649a73fdb44ca4aa4f5ff775e5a8131f22e2833ae724c">INTERLEAVED_EMBED_EXTRACT</a>,
<a name="l00042"></a>00042         };
<a name="l00043"></a>00043 
<a name="l00044"></a><a class="code" href="classISampleIO.html#a985086c7a1f28cbfe8b4a63b406d0d5a">00044</a>         <a class="code" href="classISampleIO.html#a985086c7a1f28cbfe8b4a63b406d0d5a">ISampleIO</a>() { }
<a name="l00045"></a><a class="code" href="classISampleIO.html#abe594f33c7c78c506cd9a023da0f7178">00045</a>         <span class="keyword">virtual</span> <a class="code" href="classISampleIO.html#abe594f33c7c78c506cd9a023da0f7178">~ISampleIO</a>() { }
<a name="l00046"></a>00046 
<a name="l00047"></a>00047         <span class="comment">/*</span>
<a name="l00048"></a>00048 <span class="comment">         * FIXXXME: init should be passed a properties reader, so the </span>
<a name="l00049"></a>00049 <span class="comment">         * interface is suitable for all implementations of the </span>
<a name="l00050"></a>00050 <span class="comment">         * ISampleIO interface which in turn knows which values</span>
<a name="l00051"></a>00051 <span class="comment">         * to look for</span>
<a name="l00052"></a>00052 <span class="comment">         */</span>
<a name="l00053"></a>00053         
<a name="l00062"></a>00062         <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classISampleIO.html#ab8ef7dd9048d0944d3c5f50329e0874d">init</a>(<a class="code" href="properties__reader_8h.html#a67847fd00cb49d80dd45f61722eb9a43">CPropertiesReader</a> *pConfig) = 0;
<a name="l00063"></a>00063         <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classISampleIO.html#a4a3ef7be5c5abba7f9993913380cb14f">destroy</a>() = 0;
<a name="l00064"></a>00064 
<a name="l00073"></a>00073         <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classISampleIO.html#a5843d1feda7bfffb86dd260a08f5516d">read</a>(<span class="keywordtype">void</span>** pData, <a class="code" href="classISampleIO.html#a33f1d3778c9c332648df649a73fdb44c">EAction</a>&amp; pAction, <span class="keywordtype">int</span> pTimeout = 500000) = 0;
<a name="l00074"></a>00074 
<a name="l00082"></a>00082         <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classISampleIO.html#ae2026aece7114980b715076b45b906f9">write</a>(<span class="keywordtype">void</span>* pData, <span class="keyword">const</span> <a class="code" href="classISampleIO.html#a33f1d3778c9c332648df649a73fdb44c">EAction</a>&amp; pAction, <span class="keywordtype">int</span> pLength) = 0;
<a name="l00083"></a>00083 
<a name="l00084"></a>00084         <span class="keyword">virtual</span> <a class="code" href="structNAudioFormats_1_1SStreamInfo.html">NAudioFormats::SStreamInfo</a> <a class="code" href="classISampleIO.html#a9e43c9190bd486f654f930aa49af48d1">getStreamInfo</a>() = 0;
<a name="l00085"></a>00085 
<a name="l00086"></a>00086 <span class="keyword">private</span>:
<a name="l00087"></a>00087         <a class="code" href="classISampleIO.html#a985086c7a1f28cbfe8b4a63b406d0d5a">ISampleIO</a>(<span class="keyword">const</span> <a class="code" href="classISampleIO.html">ISampleIO</a>&amp; );
<a name="l00088"></a>00088         <a class="code" href="classISampleIO.html">ISampleIO</a>&amp; <a class="code" href="classISampleIO.html#aa0797a30e4518f23193ec749a9baf339">operator=</a>(<span class="keyword">const</span> <a class="code" href="classISampleIO.html">ISampleIO</a>&amp; );
<a name="l00089"></a>00089 };
<a name="l00090"></a>00090 
<a name="l00091"></a>00091 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Wed Jan 25 2012 22:00:39 for Whisper by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
